import {createApp} from 'vue'
import './style.css'
import App from './App.vue'
import router from './router'
import components from "./components";
import {createPinia} from "pinia";
import piniaPersist from 'pinia-plugin-persistedstate'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
//@ts-ignore
import JsonViewer from "vue-json-viewer";

const pinia = createPinia();
pinia.use(piniaPersist)
const app = createApp(App)
app.use(router).use(components).use(pinia).use(ElementPlus).use(JsonViewer);
app.mount('#app')

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
